<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <p></p>
    <script src="../js/axios.min.js"></script>
    <script>
        axios({
            url: 'http://hmajax.itheima.net/api/city',
            // 查询参数
            params: {
                pname: '河北省'
            }
        }).then(result => {
            console.log(result.data.list);
            //['石家庄市', '唐山市', '秦皇岛市', '邯郸市', '邢台市', '保定市', '张家口市', '承德市', '沧州市', '廊坊市', '衡水市']

            document.querySelector('p').innerHTML = result.data.list.join('<br>')
        })
    </script>
</body>

</html>